new function to toggle line wrapping like gtk_text_set_word_wrap ()
authorMartin Baulig <martin@home-of-linux.org>
Sun, 18 Oct 1998 13:10:08 +0000 (13:10 +0000)
committerMartin Baulig <martin@src.gnome.org>
Sun, 18 Oct 1998 13:10:08 +0000 (13:10 +0000)
1998-10-18  Martin Baulig  <martin@home-of-linux.org>

* gtk/gtktext.c (gtk_text_set_line_wrap): new function to toggle
line wrapping like gtk_text_set_word_wrap () toggles word wrapping.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktext.c
gtk/gtktext.h

index 552a072aad61cfcae6a0a3c03966e6ef0814d18e..95ed02575173a330bf27618e6a7604b961662a76 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+1998-10-18  Martin Baulig  <martin@home-of-linux.org>
+
+       * gtk/gtktext.c (gtk_text_set_line_wrap): new function to toggle
+       line wrapping like gtk_text_set_word_wrap () toggles word wrapping.
+
 Fri Oct 16 15:59:02 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/testgtk.c (insert_row_clist) (create_clist): change a few cell
index 552a072aad61cfcae6a0a3c03966e6ef0814d18e..95ed02575173a330bf27618e6a7604b961662a76 100644 (file)
@@ -1,3 +1,8 @@
+1998-10-18  Martin Baulig  <martin@home-of-linux.org>
+
+       * gtk/gtktext.c (gtk_text_set_line_wrap): new function to toggle
+       line wrapping like gtk_text_set_word_wrap () toggles word wrapping.
+
 Fri Oct 16 15:59:02 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/testgtk.c (insert_row_clist) (create_clist): change a few cell
index 552a072aad61cfcae6a0a3c03966e6ef0814d18e..95ed02575173a330bf27618e6a7604b961662a76 100644 (file)
@@ -1,3 +1,8 @@
+1998-10-18  Martin Baulig  <martin@home-of-linux.org>
+
+       * gtk/gtktext.c (gtk_text_set_line_wrap): new function to toggle
+       line wrapping like gtk_text_set_word_wrap () toggles word wrapping.
+
 Fri Oct 16 15:59:02 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/testgtk.c (insert_row_clist) (create_clist): change a few cell
index 552a072aad61cfcae6a0a3c03966e6ef0814d18e..95ed02575173a330bf27618e6a7604b961662a76 100644 (file)
@@ -1,3 +1,8 @@
+1998-10-18  Martin Baulig  <martin@home-of-linux.org>
+
+       * gtk/gtktext.c (gtk_text_set_line_wrap): new function to toggle
+       line wrapping like gtk_text_set_word_wrap () toggles word wrapping.
+
 Fri Oct 16 15:59:02 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/testgtk.c (insert_row_clist) (create_clist): change a few cell
index 552a072aad61cfcae6a0a3c03966e6ef0814d18e..95ed02575173a330bf27618e6a7604b961662a76 100644 (file)
@@ -1,3 +1,8 @@
+1998-10-18  Martin Baulig  <martin@home-of-linux.org>
+
+       * gtk/gtktext.c (gtk_text_set_line_wrap): new function to toggle
+       line wrapping like gtk_text_set_word_wrap () toggles word wrapping.
+
 Fri Oct 16 15:59:02 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/testgtk.c (insert_row_clist) (create_clist): change a few cell
index 552a072aad61cfcae6a0a3c03966e6ef0814d18e..95ed02575173a330bf27618e6a7604b961662a76 100644 (file)
@@ -1,3 +1,8 @@
+1998-10-18  Martin Baulig  <martin@home-of-linux.org>
+
+       * gtk/gtktext.c (gtk_text_set_line_wrap): new function to toggle
+       line wrapping like gtk_text_set_word_wrap () toggles word wrapping.
+
 Fri Oct 16 15:59:02 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/testgtk.c (insert_row_clist) (create_clist): change a few cell
index 552a072aad61cfcae6a0a3c03966e6ef0814d18e..95ed02575173a330bf27618e6a7604b961662a76 100644 (file)
@@ -1,3 +1,8 @@
+1998-10-18  Martin Baulig  <martin@home-of-linux.org>
+
+       * gtk/gtktext.c (gtk_text_set_line_wrap): new function to toggle
+       line wrapping like gtk_text_set_word_wrap () toggles word wrapping.
+
 Fri Oct 16 15:59:02 1998  Lars Hamann  <lars@gtk.org>
 
        * gtk/testgtk.c (insert_row_clist) (create_clist): change a few cell
index 83088c7cf6010326168e2778ee4460f40d90cd36..b07e3b98afaa097b0ee773d5ba52ec6789d14e72 100644 (file)
@@ -625,6 +625,22 @@ gtk_text_set_word_wrap (GtkText *text,
     }
 }
 
+void
+gtk_text_set_line_wrap (GtkText *text,
+                       gint     line_wrap)
+{
+  g_return_if_fail (text != NULL);
+  g_return_if_fail (GTK_IS_TEXT (text));
+  
+  text->line_wrap = (line_wrap != FALSE);
+  
+  if (GTK_WIDGET_REALIZED (text))
+    {
+      recompute_geometry (text);
+      gtk_widget_queue_draw (GTK_WIDGET (text));
+    }
+}
+
 void
 gtk_text_set_editable (GtkText *text,
                       gboolean is_editable)
index 1aba9a1a7914fcc7d936882196c428ab9fce503b..7018667c1e9c3959a9284c3849475be660ae4417 100644 (file)
@@ -166,6 +166,8 @@ void       gtk_text_set_editable    (GtkText       *text,
                                     gboolean       editable);
 void       gtk_text_set_word_wrap   (GtkText       *text,
                                     gint           word_wrap);
+void       gtk_text_set_line_wrap   (GtkText       *text,
+                                    gint           line_wrap);
 void       gtk_text_set_adjustments (GtkText       *text,
                                     GtkAdjustment *hadj,
                                     GtkAdjustment *vadj);